//
//  MainViewController.m
//  LRAccount
//
//  Created by dev on 2018/7/31.
//  Copyright © 2018年 武汉伴悦科技. All rights reserved.
//

#import "MainViewController.h"
#import "LoginVC.h"

@interface MainViewController ()
@property (weak, nonatomic) IBOutlet UITableView *tableView;

@end

@implementation MainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.delegate=self;
    self.tableView.dataSource=self;
    [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
    self.tableView.separatorStyle=0;
    // Do any additional setup after loading the view from its nib.
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    switch (indexPath.row) {
        case 0:
            {
                LoginVC *vc=[[LoginVC alloc]init];
                [self.navigationController pushViewController:vc animated:YES];
                
            }
            break;
        case 1:
        {
            LoginVC *vc=[[LoginVC alloc]init];
            [self.navigationController pushViewController:vc animated:YES];
            
        }
            break;
        case 2:
        {
            LoginVC *vc=[[LoginVC alloc]init];
            [self.navigationController pushViewController:vc animated:YES];
            
        }
            break;
        case 3:
        {
            LoginVC *vc=[[LoginVC alloc]init];
            [self.navigationController pushViewController:vc animated:YES];
            
        }
            break;
            
        default:
            break;
    }
    
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 4;
    
}

// Row display. Implementers should *always* try to reuse cells by setting each cell's reuseIdentifier and querying for available reusable cells with dequeueReusableCellWithIdentifier:
// Cell gets various attributes set automatically based on table (separators) and data source (accessory views, editing controls)

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UITableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
    if(cell==nil)
    {
        cell=[[UITableViewCell alloc]init];
        
    }
    cell.selectionStyle=0;
    switch (indexPath.row) {
        case 0:
            cell.textLabel.text=@"登录";
            break;
        case 1:
            cell.textLabel.text=@"注册";
            break;
        case 2:
            cell.textLabel.text=@"修改密码";
            break;
        case 3:
            cell.textLabel.text=@"忘记密码";
            break;
            
        default:
            break;
    }
    return cell;
    
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
